#include "fsl_common.h"
#include "fsl_iomuxc.h"
#include "MCIMX6Y2.h"

void delay(int n)
{
    n=n*100000;
     while(n--);
}


int main()
{
     CCM->CCGR0=0xFFFFFFFF;
     CCM->CCGR1=0xFFFFFFFF;
     CCM->CCGR2=0xFFFFFFFF;
     CCM->CCGR3=0xFFFFFFFF;
     CCM->CCGR4=0xFFFFFFFF;
     CCM->CCGR5=0xFFFFFFFF;
     CCM->CCGR6=0xFFFFFFFF;

    
    IOMUXC_SetPinMux(IOMUXC_GPIO1_IO04_GPIO1_IO04,0);
    IOMUXC_SetPinConfig(IOMUXC_GPIO1_IO04_GPIO1_IO04,0x10b0);

    GPIO1->GDIR=0x10;
    GPIO1->DR=0;

    while(1)
    {
        GPIO1->DR=0x0;
        delay(10);
        GPIO1->DR=0x10;
        delay(10);
    }


    return 0;
}